<template>
  <div class="box">{{ 1 + 1 }} : {{ name }}</div>
  <div>
    {{ c }} : {{ d }}
    <button @click="add">添加</button>
    <button @click="add1">添加2</button>
  </div>
</template>
<script setup>
import { ref } from 'vue'
import { useRoute } from 'vue-router'
const name = ref(0)
const add = () => {
  name.value++
}
const props = defineProps(['t'])
const route = useRoute()
console.log(props, route)
</script>
<script>
export default {
  data() {
    return {
      c: 1,
      d: 2
    }
  },
  methods: {
    add1() {
      console.log(`helloworld`)
    }
  }
}
</script>
<style type="text/css">
.box {
  width: 100px;
  height: 100px;
  border: 1px solid #000;
}
</style>
